package com.quwan.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author quan
 * @date 2021-12-09 14:12
 */
@Getter
@AllArgsConstructor
public enum AppleProductEnum {

    one("com.qudan.QuDanOEM.OneMonth", 1,"一个月会员"),
    three("com.qudan.QuDanOEM.ThreeMonth",2,  "三个月会员"),
    year("com.qudan.QuDanOEM.OneYear", 3, "一年会员");
    String type;
    Integer id;
    String desc;


    public static AppleProductEnum getByType(String type) {
        for (AppleProductEnum value : values()) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return null;
    }
}
